package com.yang.leather.core;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class BaseServletContext implements ServletContextListener {
	private static ServletContext servletContxt;

	public static ServletContext getServletContxt() {
		return servletContxt;
	}

	public void setServletContxt(ServletContext arg0) {
		servletContxt = arg0;
	}

	public void contextDestroyed(ServletContextEvent arg0) {
	}

	public void contextInitialized(ServletContextEvent arg0) {
		init(arg0);
	}

	private void init(ServletContextEvent sce) {
		setServletContxt(sce.getServletContext());
	}
}
